package com.colorlight.cloud.common.model;

import com.colorlight.cloud.common.model.enums.api.ExceptionInterface;
import lombok.Getter;

/**
 * @author Demon
 * 业务异常定义
 */
@Getter
public enum ExceptionEnum implements ExceptionInterface<ExceptionEnum> {
	
	NOT_EXIST_ENUM(20001, "not exist enum"),
	MSG_PARAMETER_EXCEPTION(20002, "msg parameter exception");
	
	/**
	 * 编码
	 */
	private final Integer code;
	
	/**
	 * 异常信息描述
	 */
	private final String description;
	
	
	ExceptionEnum(Integer code, String description) {
		this.code = code;
		this.description = description;
	}
	
	@Override
	public Integer getCode() {
		return code;
	}
	
	@Override
	public ExceptionEnum getT() {
		return this;
	}
	
	@Override
	public String getThisDescription() {
		return this.getDescription();
	}
}
